function [FeatureCommonNeighborTable] = Ddavid_get_feature_common_neighbor(DataSampler, SizeLabel, K, KNNList, TrainingKNNList, SampledTrueLabelTraining)

N = size(KNNList, 1);
DataSamplerList = find(DataSampler == 1);
M = size(DataSamplerList, 2);
SampledTrueLabelListTraining = (SampledTrueLabelTraining == 1);

FeatureCommonNeighborTable = zeros(N, SizeLabel);

TempKNNList = KNNList(:, 1:K);
TempTrainingKNNList = TrainingKNNList(:, 1:K);

for SizeCounter = 1:N
    for SampledSizeCounter = 1:M
        KNN1 = TempKNNList(SizeCounter, :);
        KNN2 = TempTrainingKNNList(DataSamplerList(SampledSizeCounter), :);
        if(size(intersect(KNN1, KNN2), 2) > 0)
            FeatureCommonNeighborTable(SizeCounter, :) = FeatureCommonNeighborTable(SizeCounter, :) + SampledTrueLabelListTraining(DataSamplerList(SampledSizeCounter), :);
        end
    end
end

TrainingLabeledSize = Ddavid_get_training_labeled_size(SampledTrueLabelTraining); % The number of the data with each label

for LabelCounter = 1:SizeLabel
    if(TrainingLabeledSize(LabelCounter) == 0)
        FeatureCommonNeighborTable(:, LabelCounter) = 0;
    else
        FeatureCommonNeighborTable(:, LabelCounter) = FeatureCommonNeighborTable(:, LabelCounter) / TrainingLabeledSize(LabelCounter);
    end
end
